
#pragma once

#include "zen_vap.h"
#include "zen_image_coder.h"
#include "zen_audio_wav.h"
#include "zen_utils.h"
#include "zen_log.h"
#include "Config.hpp"

using namespace Zen;
using namespace Zen::Vap;

class VConfigs
{
public:

	static VConfigs * Get();

//	Zen::ImageDefaultDecoder image_decoder;

	std::shared_ptr<FontBrush> font_brush_normal;

public:
	VConfigs();
	
	void initPathes();
	std::string getPath(std::string const & key);
	std::string getPath(std::string const & key, int index);

	void initViewSize(Size2 size);
	Size2 const & getViewSize() { return m_view_size; }
	Size2 const & getEdgeSize() { return m_edge_size; }

	
protected:
	std::map<std::string, std::string> m_pathes;
	Zen::Size2 m_view_size;
	Size2 m_edge_size;

};


#define GetPath(...) VConfigs::Get()->getPath(__VA_ARGS__)


inline SharedTexture GetTexture(std::string const & path)
{
	return TexturesCache::Get()->getTexture(path);
}

#define LoadViewDeclare() virtual void load() override { this->loadView(); } \
void loadView()
